import { HashRouter, Route, Redirect, Switch ,Link} from "react-router-dom";
import Home from "../views/home/index";
import Login from "../views/login/Login";
import MyLayout from "../layout/layout";
import My from "../views/my/index";
import UserList from "../views/consumer/list";
import UserData from "../views/consumer/data";
import unReview from "../views/talk/unreview";
import Review from "../views/talk/review";
import Failed from "../views/talk/failed";
import shop from "../views/shop/shop";
import Order from "../views/order/order";
import active from "../views/active/active";
import Level from "../views/auth/level";
import Normal from "../views/auth/normal";
import Process from "../views/auth/process";
import Gitee from "../views/link/gitee";




function MyRouter() {
  return (
    <div className="App">
      <HashRouter>
        <Switch>
          <Redirect exact from="/" to="/home"></Redirect>
          <Route path="/login">
            <Login></Login>
          </Route>
          <Route path="/">
            <MyLayout>
              <Route path="/home" component={Home}></Route>
              <Route path="/My" component={My}></Route>
              <Route path="/UserList" component={UserList}></Route>
              <Route path="/UserData" component={UserData}></Route>
              <Route path="/unReview" component={unReview}></Route>
              <Route path="/Review" component={Review}></Route>
              <Route path="/Failed" component={Failed}></Route>
              <Route path="/shop" component={shop}></Route>
              <Route path="/Order" component={Order}></Route>
              <Route path="/active" component={active}></Route>
              <Route path="/Level" component={Level}></Route>
              <Route path="/Normal" component={Normal}></Route>
              <Route path="/Process" component={Process}></Route>
              <Route path="/Gitee" component={Gitee}></Route>
            </MyLayout>
          </Route>
        </Switch>
      </HashRouter>
    </div>
  );
}

export default MyRouter;

